let request=require('request')
let fs=require('fs')


let i=1,j=16;

const download=()=>{
    let name=i.toString()+'_'+j.toString()+'.jpg';
        request({url:'http://124.223.14.102:81/map/D2053/image/'+name}).pipe(
            fs.createWriteStream('./assets/map/'+name)
        ).on('close',()=>{
            console.log(name+'下载完成');
            j++;
            if(j>=18){
                j=0;
                i++;
                if(i>=20){
                    return;
                }
            }
            download();
        })
};
download();